Optimal. Leaf size=162 \[ \frac{(a+b x) (A b-a B)}{a^2 x \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{A (a+b x)}{2 a x^2 \sqrt{a^2+2 a b x+b^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0852312, antiderivative size = 162, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {770, 77} \[ \frac{(a+b x) (A b-a B)}{a^2 x \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{A (a+b x)}{2 a x^2 \sqrt{a^2+2 a b x+b^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 770
Rule 77
Rubi steps
\begin{align*} \int \frac{A+B x}{x^3 \sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\left (a b+b^2 x\right ) \int \frac{A+B x}{x^3 \left (a b+b^2 x\right )} \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{\left (a b+b^2 x\right ) \int \left (\frac{A}{a b x^3}+\frac{-A b+a B}{a^2 b x^2}+\frac{A b-a B}{a^3 x}+\frac{b (-A b+a B)}{a^3 (a+b x)}\right ) \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=-\frac{A (a+b x)}{2 a x^2 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{(A b-a B) (a+b x)}{a^2 x \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{b (A b-a B) (a+b x) \log (x)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{b (A b-a B) (a+b x) \log (a+b x)}{a^3 \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}
Mathematica [A] time = 0.0444093, size = 79, normalized size = 0.49 \[ -\frac{(a+b x) \left (2 b x^2 \log (x) (a B-A b)+2 b x^2 (A b-a B) \log (a+b x)+a (a A+2 a B x-2 A b x)\right )}{2 a^3 x^2 \sqrt{(a+b x)^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 93, normalized size = 0.6 \begin{align*}{\frac{ \left ( bx+a \right ) \left ( 2\,A\ln \left ( x \right ){x}^{2}{b}^{2}-2\,A\ln \left ( bx+a \right ){x}^{2}{b}^{2}-2\,B\ln \left ( x \right ){x}^{2}ab+2\,B\ln \left ( bx+a \right ){x}^{2}ab+2\,aAbx-2\,{a}^{2}Bx-A{a}^{2} \right ) }{2\,{a}^{3}{x}^{2}}{\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63741, size = 153, normalized size = 0.94 \begin{align*} \frac{2 \,{\left (B a b - A b^{2}\right )} x^{2} \log \left (b x + a\right ) - 2 \,{\left (B a b - A b^{2}\right )} x^{2} \log \left (x\right ) - A a^{2} - 2 \,{\left (B a^{2} - A a b\right )} x}{2 \, a^{3} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.710885, size = 131, normalized size = 0.81 \begin{align*} - \frac{A a + x \left (- 2 A b + 2 B a\right )}{2 a^{2} x^{2}} - \frac{b \left (- A b + B a\right ) \log{\left (x + \frac{- A a b^{2} + B a^{2} b - a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} + \frac{b \left (- A b + B a\right ) \log{\left (x + \frac{- A a b^{2} + B a^{2} b + a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18477, size = 158, normalized size = 0.98 \begin{align*} -\frac{{\left (B a b \mathrm{sgn}\left (b x + a\right ) - A b^{2} \mathrm{sgn}\left (b x + a\right )\right )} \log \left ({\left | x \right |}\right )}{a^{3}} + \frac{{\left (B a b^{2} \mathrm{sgn}\left (b x + a\right ) - A b^{3} \mathrm{sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b} - \frac{A a^{2} \mathrm{sgn}\left (b x + a\right ) + 2 \,{\left (B a^{2} \mathrm{sgn}\left (b x + a\right ) - A a b \mathrm{sgn}\left (b x + a\right )\right )} x}{2 \, a^{3} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]